<style>
    .form-group label{width: 120px}
</style>
<section class="content" >
    <div class="row">
        <div class="col-md-12">
            <div class="box box-danger">
                <div class="box-body">
                    <form id="member_public_editinfo_form">
                        <input type="hidden" value="{$info.id}" name="id"/>
                        <div class="form-group">
                            <label style="display:inline-table">电话
                                <i class="fa fa-pencil-square-o"></i>:</label>
                            <input type="text" placeholder="请输入手机号码" 
                                   class="form-control"  data-validation="length"
                                   data-validation-length="min6"
                                   name="mobile" value="{$info.mobile}"
                                   data-validation-error-msg="请输入正确手机号码"
                                   style="display:inline;width: 70%">
                        </div>
                        <div class="form-group">
                            <label style="display:inline-table">密码  
                                <i class="fa fa-pencil-square-o"></i>:</label>
                            <input type="text" placeholder="请输入密码" 
                                   class="form-control"  
                                   name="password" value=""  
                                   style="display:inline;width: 70%">
                        </div>
                        <div class="form-group">
                            <label style="display:inline-table">昵称  
                                <i class="fa fa-pencil-square-o"></i>:</label>
                            <input type="text" placeholder="请输入真实姓名" 
                                   class="form-control"  data-validation="length"
                                   data-validation-length="min2"
                                   name="name" value="{$info.nickname}"
                                   data-validation-error-msg="请输入真实姓名"
                                   data-validation-help="真实姓名应该为2-20位之间"
                                   style="display:inline;width: 70%">
                        </div>

                        <div class="box-footer">
                            <span class="input-group-btn">
                                <button class="btn btn-danger pull-left" type="button"  id="close-dialog">取消</button>

                                <button class="btn btn-primary pull-right" type="button" id='member_public_editinfo_form_submit'>提交</button>
                            </span>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript">
        $(function () {
            $(".select2").select2();
            $('#member_public_editinfo_form_submit').click(function () {
                $('#member_public_editinfo_form').submit();
            });
            $.validate({
                onSuccess: function () {
                    publicEditinfoFormSubmit();
                    return false;
                }
            });
        });

        function publicEditinfoFormSubmit() {
            $.post("{:U('Member/editInfo')}",
                    $("#member_public_editinfo_form").serialize(), function (res) {
                if (!res.status) {
                    $.messager.alert('提示信息', res.info, 'error');
                } else {
                    $.messager.alert('提示信息', res.info, 'info');
                    dialog.get('dialogPage').close().remove();
                    reloadContent();
                }
            });

            return false;
        }
    </script>
</section>